<?php
/**
 * APP首页接口路由
 */
Route::group(['prefix' => 'home', 'namespace' => 'Home'], function () {
    Route::get('index', 'IndexController@index');
    Route::get('search', 'IndexController@getSearch', 'get_search');
    Route::post('savesearch', 'IndexController@saveSearch', 'save_search');
    Route::get('province', 'IndexController@getProvince', 'get_province');
    Route::get('citys', 'IndexController@getCitys', 'get_citys');
    Route::get('area', 'IndexController@getArea', 'get_area');





    //发布
    Route::group(['prefix' => 'release'], function () {
        //招聘
        Route::post('option', 'ReleaseController@getOptionList');
        Route::post('recruit', 'ReleaseController@recruit');
        Route::get('job_list', 'ReleaseController@jobList');
        //订单类型
        Route::post('order', 'ReleaseController@order');
        Route::post('cates', 'ReleaseController@getCates');
        //外发类型
        Route::post('outtypes', 'ReleaseController@getOutTypes');
        //原料面料清单
        Route::post('fabric/typelist', 'CostController@getCostTypes');
        Route::post('fabric/type/add', 'CostController@setTypeAdd');
        Route::post('fabric/type/modify', 'CostController@setTypeModify');
        Route::post('fabric/add', 'CostController@setAdd');
        Route::post('fabric/modify-name', 'CostController@setModifyName');
        Route::post('fabric/modify-cost', 'CostController@setModifyCost');
        Route::post('fabric/status-set', 'CostController@setFabricStatus');
        Route::post('contract/add', 'CostController@setContractAdd');
    });

//    //搜索信息
//    Route::get('search_list', 'IndexController@searchDetail');

    //找客户
    Route::get('search/customer', 'IndexController@customer');

    //获取工厂分类
    Route::get('factory/cate', 'IndexController@factory_cate');
    //工厂列表
    Route::get('factory', 'IndexController@factory');
    //工厂详情
    Route::get('factory/detail', 'IndexController@factory_detail');

    //获取找客户分类列表
    Route::get('customer/cate', 'IndexController@customer_cate');
    //客户列表
    Route::get('customer', 'IndexController@customer');
    //客户详情
    Route::get('customer/detail', 'IndexController@customer_detail');

    //首页查找部门
    Route::get('staff/cate', 'IndexController@staff_cate');
    //首页-查找员工-结果列表
    Route::get('staff', 'IndexController@staff');
    //员工详情
    Route::get('staff/detail', 'IndexController@staff_detail');

    /**
     * 制作者：九哥
     */
    Route::group(['prefix' => 'search'], function () {
        Route::post('history', 'SearchController@getHistoryList'); //搜索历史
        Route::post('list', 'SearchController@getIndexList'); //搜索结果
//        Route::post('init', 'SearchController@setInit'); //搜索初始化
    });

    /**
     * 制作者：九哥
     */
    Route::group(['prefix' => 'search'], function () {
        Route::post('history', 'SearchController@getHistoryList'); //搜索历史
        Route::post('list', 'SearchController@getIndexList'); //搜索结果
//        Route::post('init', 'SearchController@setInit'); //搜索初始化
    });
//    Route::post('point-set', 'SearchController@setPoint'); //坐标同步
    Route::group(['prefix' => 'locate'], function () {
        Route::post('provice', 'SearchController@getProviceList');
        Route::post('city', 'SearchController@getCityList');
        Route::post('region', 'SearchController@getRegionList');
    });

    /**
     * 制作者：九哥
     */
    Route::post('ad', 'AdController@index');

    /**
     * 制作者：九哥
     * 招聘接口
     */
    Route::group(['prefix' => 'recruit'], function () {
        Route::post('index', 'RecruitController@getIndexList');
        Route::post('jobsbycid', 'RecruitController@getIndexByCid');
//        Route::post('add', 'RecruitController@setAdd');
        Route::post('show', 'RecruitController@getShow');
        //发送简历
        Route::post('resume-add', 'RecruitController@sendResume');
//        Route::post('resume-get', 'RecruitController@getResume');
        //面试邀请
        Route::post('meet-set', 'RecruitController@setMeet');
        Route::post('meet-get', 'RecruitController@getMeet');
    });
});